<?php require_once 'header2.php';?> 
<div class="main">
	<style>
#explain{width:420px;list-style:none; display: inline;} 
#explain li{margin:0 0;padding:0 0;}
	</style>
	<div class="left_cn">
		<h2>每日一句</h2>
		<div><a href="/index.php/admin/home/dailyonelist" target="mainSide">查看历史记录</a></div>
		
		<form action="<?php echo current_url(); ?>" method="POST">
			<p>拼音：
				<?php if(isset($dailyone_id)){ ?>
				<input type="hidden" name="id"  value="<?php echo $dailyone_id; unset($dailyone_id);?>" />
				<?php } ?>
				<input type="text" name="pinyin" class="bigone" value="<?php if(isset($dailyone_cn['pinyin'])){echo $dailyone_cn['pinyin']; unset($dailyone_cn['pinyin']);}?>" />
			</p>
			<p>语句：
		 		<input type="text" name="sentence"  class="bigone" value="<?php if(isset($dailyone_cn['sentence'])){echo $dailyone_cn['sentence']; unset($dailyone_cn['sentence']);}?>" />
			</p>
			<p>图片地址：
		 		<input type="text" name="pic"  class="bigone" value="<?php if(isset($dailyone_cn['pic'])){echo $dailyone_cn['pic']; unset($dailyone_cn['pic']);}?>" /><a href="/index.php/admin/home/uploadpic/">上传图片</a>
			</p>
			<pre   style="border:1px solid #ccc; width:540px; float:left;">
				汉语注释：
				<ul id="explain">
					<?php 
					if(isset($dailyone_cn['explain'])){
							foreach($dailyone_cn['explain'] as $v){
						?>
					<li><input type="text" name="explain[]"  value="<?php echo $v;?>" class="bigone2"/></li>
					<?php
							}
						} ?>
					<li><input type="text" name="explain[]"  value=""  class="bigone2"/></li>
				 </ul>
				<div><a href="#" style="text-decoration:none;" onclick="appendEle('explain')">+继续追加汉语注释</a></div> 
			</pre>
			<pre style="border:1px solid #ccc; width:540px;float:left">
				英语注释：
				<?php 
					if(isset($dailyone_cn['en_explain'])){ ?>
				<textarea name="en_explain" rows="4" cols="50" style="float:left; margin:10px 20px;"><?php echo $dailyone_cn['en_explain'];?></textarea>
				<?php }else{ ?>
				<textarea name="en_explain" rows="4" cols="50" style="float:left; margin:10px 20px;"></textarea>
				<?php } ?>
			</pre>
			<!-- <p>启用：
		 		<select name="flag">
		 			<?php 
		 			/*	$flag = 0;
		 				if(isset($dailyone_cn['flag'])){ 
		 				$flag = $dailyone_cn['flag'];
		 			  }*/ ?>
		 			<option value="0" <?php //echo $flag == 0?'selected':'';?>>不启用</option>
		 			<option value="1" <?php // echo $flag == 1?'selected':'';?>>启用</option>
		 		</select>
		 		
			</p>-->
			<p ><input type="submit" name="cn" value="更新数据库"/> <a href="#" onclick="updateCache('cn','dailyone');">更新中文缓存</a> <a href="#" onclick="updateCache('en','dailyone');">更新英语缓存</a></p>
		</form> 
	</div> 
</div>
<?php require_once 'footer2.php';?> 